package com.welove.util;

import android.content.Context;
import android.view.inputmethod.InputMethodManager;
import android.widget.EditText;

public class InputManager {

	public static void closeInput(Context context,EditText et)
	{
		InputMethodManager imm = (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE);
		
		imm.hideSoftInputFromWindow(et.getWindowToken(), 0);
		imm.hideSoftInputFromInputMethod(et.getWindowToken(),
				0);
	}
	public static void showInput(Context context,EditText et)
	{
		InputMethodManager imm = (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE);

		// 接受软键盘输入的编辑文本或其它视图

		imm.showSoftInput(et,InputMethodManager.SHOW_FORCED);
	}
}
